1. Field of the Invention
This invention relates to a method of compressing an image representing signal. This invention also relates to an apparatus for compressing an image representing signal.
2. Description of the Prior Art
An image representing signal is generally shortened to an image signal. Similarly, image representing data is shortened to image data. Compression of a digital image signal or image data means reduction of the total number of bits of the signal or the data. In general, the total number of bits of image data is referred to as an amount of image data.
In some systems for recording image representing data (generally shortened to image data) into a magnetic disk, the image data are compressed to enable efficient recording.
In a known image data compression apparatus, a frame represented by the image data is divided into a plurality of blocks each having N.times.N or N.times.M pixels, and the image data are subjected to orthogonal transform for each of the blocks. Then, the resultant image data (transform coefficients) are quantized with a predetermined quantization step size, and the quantization-resultant data are encoded into corresponding words of a zero run length code or a Huffman code. In this way, the image data are compressed. In such data compression, the amount of the image data, that is, the number of bits of the image data or the transmission bit rate of the image data, depends on the contents of the image represented by the image data.
There are two method of controlling the amount of image data (the number of bits of image data) at a constant amount or below a predetermined limit. According to a first method, original image data are quantized with an initial quantization step size and the amount of the quantization-resultant image data is calculated, and the quantization step size is changed to a new quantization step size in response to the calculated image data amount. The original image data are again quantized with the new quantization step size to obtain final quantized image data. The first method requires quantization to be executed twice for same image data.
A second method uses the fact that coefficients of data outputted from an orthogonal transform device have a given relation with the amount of code words (the number of bits of code words). In the second method, the sum of the squares of coefficients is calculated for each of blocks, and the blocks are sorted into classes according to the calculated sums. A larger number of bits are assigned to a block of the class corresponding to a large amount of code words, while a smaller number of bits are assigned to a block of the class corresponding to a small amount of code words. The second method requires the addition of information representing classes.